package com.lh.api.config;

import com.paypal.base.rest.APIContext;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Date 2020/5/25 0025 15:49
 * @Author GaoZien
 * @Desc Paypal配置
 */
@Configuration
public class PaypalConfig {

    @Value("${lihui.paypal_client_id}")
    private String clientId;

    @Value("${lihui.paypal_secret}")
    private String clientSecret;

    @Value("${lihui.paypal_mode}")
    private String mode;

    @Bean
    public APIContext apiContext() {
        return new APIContext(clientId, clientSecret, mode);
    }
}
